#include <iostream>
using namespace std;

class Car
{
private:
    int power;
    int seat;
public:
    Car(int power, int seat);
    ~Car();
    void show();
};

Car::Car(int power, int seat)
{   
    cout << "construct Car ..." << endl;
    this->power = power;
    this->seat = seat;
}


void Car::show(){
    cout << "car power: " << this->power <<" seat: " << this->seat << endl;
}

Car::~Car()
{
    cout << "destruct Car ..." << endl;
}


class Wagon
{
private:
    int power;
    int load;
public:
    Wagon(int power, int load);
    ~Wagon();
    void show();
};

Wagon::Wagon(int power, int load)
{   
    cout << "construct Wagon ..." << endl;
    this->power = power;
    this->load = load;
}


void Wagon::show(){
    cout << "Wagon power: " << this->power <<" load: " << this->load << endl;
}

Wagon::~Wagon()
{
    cout << "destruct Wagon ..." << endl;
}

class StationWagon : public Car, public Wagon
{
private:
    /* data */
public:
    StationWagon(int power, int seat, int load);
    ~StationWagon();
    void ShowSW();
};

StationWagon::StationWagon(int power, int seat, int load):Wagon(power, load), Car(power, seat)
{
    cout << "construct StationWagon ..." << endl;
}

void StationWagon::ShowSW() {
    cout << "StationWagon : " << endl;
    Car::show();
    Wagon::show();
}

StationWagon::~StationWagon()
{
    cout << "destruct StationWagon ..." << endl;
}


int main() {
    StationWagon sw(105,3,8);
    // sw.show();
    sw.ShowSW();

    return 0;
}

